
import 'package:flutter/material.dart';
import 'package:flutter_elf/model/home_list.dart';
import 'package:flutter_elf/model/user.dart';

import '../http_managers.dart';

class UserService{

  //登录
  static Future<HomeListResponse> login(request,{State state}) {
    return _fetch<HomeListResponse>(Api.homeList, request,state: state);
  }

  static Future<T> _fetch<T>(String url,String request,{State state}){
    return HttpManagers().netFetch<T>(url,request,fromType: 'UserService',state: state);
  }
}